package Classes;
import javax.swing.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.io.File;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

class tlo extends JPanel{
	
	private BufferedImage img;
	private File imageFile;
	
	public void paintComponent(Graphics g)
	{
		Graphics2D g2 = (Graphics2D)g;
		imageFile = new File("res/img/tlo.jpg");
		try {
			img = ImageIO.read(imageFile);
			g2.drawImage(img, 0, 0, this);
		} catch (IOException e) {
			System.err.println("Blad odczytu obrazka");
			e.printStackTrace();
		}
	}
}

class tlo2 extends JPanel{
	
	private BufferedImage img;
	private File imageFile;
	
	public void paintComponent(Graphics g)
	{
		Graphics2D g2 = (Graphics2D)g;
		imageFile = new File("res/img/tlo2.jpg");
		try {
			img = ImageIO.read(imageFile);
			g2.drawImage(img, 0, 0, this);
		} catch (IOException e) {
			System.err.println("Blad odczytu obrazka");
			e.printStackTrace();
		}
	}
}
